//
//  MyOrderTypeTableViewCell.m
//  GLGW_Shoping
//
//  Created by yang on 2018/11/21.
//  Copyright © 2018年 yang. All rights reserved.
//

#import "MyOrderTypeTableViewCell.h"

@implementation MyOrderTypeTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        CGFloat butWidth = KScreenWidth/5;
        NSArray * butTitArr = @[@"确认中",@"待支付",@"线下待确认",@"待发货",@"待收货"];
        NSArray * imageArr = @[@"icon_querenzhong",@"icon_daizhifu",@"icon_xianxiadaiqueren",@"icon_daifahuo",@"icon_daishouhuo"];
        for (int i=0; i<5; i++) {
            GLGWButton * actionBut = [[GLGWButton alloc] initWithFrame:CGRectMake(butWidth*i, kHeightProportion_In_iPhoneTriploid(5), butWidth, kHeightProportion_In_iPhoneTriploid(83)) titleText:butTitArr[i] titleLableFont:SYSTEMFONT(13) titleLableColor:[UIColor colorWithHexString:@"#666666"] inSuperView:self];
            actionBut.tag = 261+i;
            actionBut.image_Name = imageArr[i];
            [actionBut setImagePositionWithType:SSImagePositionTypeTop spacing:kHeightProportion_In_iPhoneTriploid(10)];
            [actionBut addTarget:self action:@selector(orderAction:) forControlEvents:UIControlEventTouchUpInside];
        }
    }
    return self;
}

-(void)orderAction:(GLGWButton *)sender{
    if (self.Block_OrderTypeAction) {
        self.Block_OrderTypeAction(sender);
    }
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
